import React from 'react';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import Button, {ButtonSize, ButtonType} from "components/Button/button";
import Alert from "components/Alert/alert";
import Menu from "./components/Menu/menu";
import MenuItem from "./components/Menu/menuItem";
import SubMenu from "./components/Menu/subMenu";
library.add(fas);

const App: React.FC = () => {
    return (
        <div className="App" style={{padding: '40px'}}>
            <Button btnType={'danger'} disabled={true}>123</Button>
            <Button onClick={() => {
                console.log(123)
            }} btnType={'primary'}>123</Button>
            <Button btnType={'link'} size={'lg'} href={'#'}>按钮</Button>
            <Alert/>
            <Alert type={'success'} description={'123123'} closable={true} onClick={() => {
                console.log(1231)
            }}/>
            <Alert type={'danger'}/>
            <Alert type={'warning'}/>
            <Menu
                defaultIndex={'0'}
                onSelect={(index) => console.log(index)}
                mode="vertical"
                defaultOpenSubMenus={['2']}
            >
                <MenuItem>项目1</MenuItem>
                <MenuItem disabled>项目2</MenuItem>
                <MenuItem>项目3</MenuItem>
                <SubMenu title="dropdown" >
                    <MenuItem>dropdown1</MenuItem>
                    <MenuItem>dropdown2</MenuItem>
                    <MenuItem>dropdown3</MenuItem>
                </SubMenu>
            </Menu>
        </div>
    );
}

export default App;
